Reverse Engineering Models
You can create a data model from a database or a script using the Reverse Engineering process.
This topic walks you through the steps to reverse engineer a MongoDB model. Similarly, you can reverse engineer a model from your Cassandra Keyspace and Couchbase Bucket.
To reverse engineer a model:
-
In erwin Data Modeler (DM), click Actions > Reverse Engineer.
The New Model screen appears. -
Click Logical/Physical and set Database to MongoDB.
-
Click Next.
The Reverse Engineer Process Wizard appears. -
Click one of the following options:
-
Database: Use this option to reverse engineer a model from your database.
-
Script File: Use this option to reverse engineer a model from a script. Selecting this option enables the File field. Click Browse and select the necessary script file.
Note: If you click Script File, jump to step 8 below and ensure that Document Count or Document % is not set to zero (0).
-
-
Click Next.
The Connection section appears. Use this section to connect to the database from which you want to reverse engineer the model. You can connect to the database directly or using a connection string. The following table explains the connection parameters:
Connection Method Parameters/Values Connection String Specify the MongoDB Connection String.
For example: mongodb+srv://<abcd>:****@<xyz>.mongodb.net/test?retryWrites=true&w=majorityReplace <abcd> with your username and <xyz> with host name. The host name parameter would change based on your MongoDB deployment; standalone, replica set, or a sharded cluster.
Direct Specify the host name and port number of your MongoDB deployment. Also, specify the database that you want to connect to. In the following image, for example, the connection is being established using a connection string.
-
Click Connect.
On successful connection, your connection information is displayed under Recent Connections. -
Click Next.
The Database section appears. It displays a list of available databases.
-
Under Available Databases, select the databases that you want to reverse engineer. Then, click
.
This moves the selected databases under Selected Databases.
-
Click Next.
The Collection section appears. It displays a list of available collections in the databases that you selected in step 8. -
Use the following options:
-
Document Count/Document (%): Use this option to specify the number of documents or percentage of total records that the newly generated model schema would contain.
-
Deep Search: Use this option to specify whether the deep search algorithm is used to retrieve the right samples for schema generation.
-
Sampling: Use the Sequence or Random sampling methods to sample records in the selected collections. Sampling enables you to retrieve right estimates for accurate collection schema generation.
-
-
Under Available Collections, select the collections that you want to reverse engineer. Then, click
.
This moves the selected collections under Selected Collections. -
Click Next.
The Option Set section appears. It displays the default option set. You can either use the default or a custom option set. -
Click Next.
The Detail Options section appears. Set up appropriate options based on your requirement. -
Click OK.
The reverse engineering process starts.
Once the process is complete, based on your selections, a schema is generated and a model is created.
Copyright © 2021 Quest Software Inc. All rights reserved. All trademarks, trade names, service marks, and logos referenced herein belong to their respective companies. |